package taskadvanced.tests.unit;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;

import java.security.NoSuchAlgorithmException;

import org.junit.Before;
import org.junit.Test;

import taskadvanced.core.rtm.Service;


public class ServiceTest {
	private Service service;
	
	@Before
	public void setUp(){
		service = new Service();
		
	}
	
	@Test
	public void isAuthorizedTest(){
		assertTrue(!service.isAuthorized());
	}
	
	@Test
	public void calculateMD5Test() throws NoSuchAlgorithmException{
		assertEquals(service.calculateMD5("this is a test"),"54b0c58c7ce9f2a8b551351102ee0938");
		assertEquals(service.calculateMD5("23523532532nkfsa12"),"4458242b8e93b872d371613f1b81f836");
		assertEquals(service.calculateMD5("hsdWdkWQsd"),"75e7424df160b07aa555fb9617953ccb");
	}
}
